<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="../../../../WEB-INF/myTag.tld" prefix="my"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>人员布控</title>
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/bootstrap.min.css?v=3.3.5"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/font-awesome.min.css?v=4.4.0"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/animate.min.css"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/plugins/toastr/toastr.min.css"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/style.min.css?v=4.0.0"
	rel="stylesheet">
	
	
<link href="<%=request.getContextPath()%>/views/sysdefault/css/plugins/datapicker/datepicker3.css" rel="stylesheet">

</head>

<body class="gray-bg">

	<div class="wrapper wrapper-content animated fadeInRight">
	
	<form id="subForm" method="post" class="form-horizontal" onsubmit="return beforeSub();">
	
		<div class="row">
		
			<!-- 人员信息 -->
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>
							<a class="btn-xs btn-white btn-bitbucket"
								href="javascript:window.history.go(-1);">&nbsp;<i
								class="fa fa-reply"></i>&nbsp;
							</a>&nbsp;&nbsp;人员信息
						</h5>
						<div class="ibox-tools">
							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
							</a>
						</div>
					</div>

						<div class="ibox-content">

							<div class="row">
							
								<div class="col-sm-6">
									<div class="form-group">
										<label class="col-sm-2 control-label">姓名&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<input type="text" name="xm"
												class="form-control" maxlength="20" value="${monitor.xm}" required="" >
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">性别&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<select name="xb" class="form-control" required="">
												<option value="1"
													<c:if test="${monitor.xb == '1'}">selected="selected"</c:if>>男</option>
												<option value="2"
													<c:if test="${monitor.xb == '2'}">selected="selected"</c:if>>女</option>
											</select>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">证件类型&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<select name="zjlx" class="form-control" required="">
												<option value="1"
													<c:if test="${monitor.zjlx == '1'}">selected="selected"</c:if>>身份证</option>
												<option value="2"
													<c:if test="${monitor.zjlx == '2'}">selected="selected"</c:if>>护照</option>
											</select>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">证件号码&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<input type="text" name="zjhm"
												class="form-control" maxlength="30" value="${monitor.zjhm}" required="">
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">身高(CM)：</label>
										<div class="col-sm-4">
											<input name="sg" type="text" maxlength="3"
												class="form-control" value="${monitor.sg}">
										</div>
									</div>
								</div>
								
								<div class="col-sm-6">
									<div class="form-group">
										<label class="col-sm-2 control-label">相片：</label>
										<div class="col-sm-10">
											<div id="imgdiv_1">
												<img id="imgShow_1" width="160" height="180"
													style="cursor: pointer;" onclick="clickImg('up_img_1', 'imgShow_1', 800);" />
											</div>
											<input type="hidden" id="up_img_1" name="zp" />
										</div>
									</div>
									
									<div class="form-group" id="data_1">
										<label class="col-sm-2 control-label">出生日期：</label>
										<div class="col-sm-4 input-group date">
                                			<input type="text" class="form-control" name="csrq" value="${monitor.csrq}">
                                			<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            			</div>
									</div>
								</div>
							
								<div class="col-sm-12">
									
									<div class="form-group">
										<label class="col-sm-1 control-label">现住址：</label>
										<div class="col-sm-6">
											<input name="xzdz" type="text" maxlength="50"
												class="form-control" value="${app.xzdz}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-1 control-label">户籍住址：</label>
										<div class="col-sm-6">
											<input name="hjzz" type="text" maxlength="50"
												class="form-control" value="${monitor.hjzz}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-1 control-label">体貌特征：</label>
										<div class="col-sm-6">
											<textarea name="tmtz" rows="6" maxlength="500" class="form-control">${monitor.tmtz}</textarea>
										</div>
									</div>

								</div>
								
							</div>
						</div>
				</div>
			</div>
			
			<!-- 布控信息 -->
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>
							布控信息
						</h5>
						<div class="ibox-tools">
							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
							</a>
						</div>
					</div>

						<div class="ibox-content">

							<div class="row">
							
								<div class="col-sm-6">
									<div class="form-group">
										<label class="col-sm-2 control-label">布控类型&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<select name="bklx" class="form-control" required="">
												<option value="1"
													<c:if test="${monitor.bxlx == '1'}">selected="selected"</c:if>>私密布控</option>
												<option value="2"
													<c:if test="${monitor.bxlx == '2'}">selected="selected"</c:if>>公开布控</option>
											</select>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">指令级别&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<select name="zljb" class="form-control" required="">
												<option value="1"
													<c:if test="${monitor.zljb == '1'}">selected="selected"</c:if>>一级</option>
												<option value="2"
													<c:if test="${monitor.zljb == '2'}">selected="selected"</c:if>>二级</option>
													<option value="3"
													<c:if test="${monitor.zljb == '3'}">selected="selected"</c:if>>三级</option>
											</select>
										</div>
									</div>
									
									<div class="form-group" id="data_2">
										<label class="col-sm-2 control-label">起始日期&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4 input-group date">
                                			<input type="text" class="form-control" name="qsrq" value="${monitor.qsrq}" required="">
                                			<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            			</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">处置措施&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<select name="czcs" class="form-control" required="">
												<option value="1"
													<c:if test="${monitor.czcs == '1'}">selected="selected"</c:if>>抓捕</option>
												<option value="2"
													<c:if test="${monitor.czcs == '2'}">selected="selected"</c:if>>管控</option>
												<option value="3"
													<c:if test="${monitor.czcs == '3'}">selected="selected"</c:if>>经营</option>
												<option value="4"
													<c:if test="${monitor.czcs == '4'}">selected="selected"</c:if>>关注</option>
												<option value="5"
													<c:if test="${monitor.czcs == '5'}">selected="selected"</c:if>>其它</option>
											</select>
										</div>
									</div>
									
								</div>
								
								<div class="col-sm-6">
									<div class="form-group">
										<label class="col-sm-2 control-label">管控类型&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<select name="gklx" class="form-control" required="">
												<option value="1"
													<c:if test="${monitor.gklx == '1'}">selected="selected"</c:if>>县级</option>
												<option value="2"
													<c:if test="${monitor.gklx == '2'}">selected="selected"</c:if>>市级</option>
												<option value="3"
													<c:if test="${monitor.gklx == '3'}">selected="selected"</c:if>>省级</option>
											</select>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">布控事由&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<select name="bksy" class="form-control" required="">
												<option value="1"
													<c:if test="${monitor.bksy == '1'}">selected="selected"</c:if>>涉事</option>
												<option value="2"
													<c:if test="${monitor.bksy == '2'}">selected="selected"</c:if>>涉稳</option>
												<option value="3"
													<c:if test="${monitor.bksy == '3'}">selected="selected"</c:if>>涉案</option>
												<option value="4"
													<c:if test="${monitor.type == '4'}">selected="selected"</c:if>>关系人</option>
											</select>
										</div>
									</div>
									
									<div class="form-group" id="data_2">
										<label class="col-sm-2 control-label">截止日期&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4 input-group date">
                                			<input type="text" class="form-control" name="jzrq" value="${monitor.jzrq}" required="">
                                			<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            			</div>
									</div>
								</div>
							
								<div class="col-sm-12">
									
									<div class="form-group">
										<label class="col-sm-1 control-label">布控原因&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-6">
											<textarea name="bkyy" rows="6" maxlength="500" class="form-control" required="">${monitor.bkyy}</textarea>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-1 control-label">处置要求&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-6">
											<textarea name="czyq" rows="6" maxlength="500" class="form-control" required="">${monitor.czyq}</textarea>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-1 control-label">执法依据&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-6">
											<textarea name="zfyj" rows="6" maxlength="500" class="form-control" required="">${monitor.zfyj}</textarea>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-1 control-label">备注：</label>
										<div class="col-sm-6">
											<textarea name="bz" rows="6" maxlength="500" class="form-control">${monitor.bz}</textarea>
										</div>
									</div>

								</div>
							</div>

						</div>
				</div>
			</div>
			
			<!-- 申请布控信息 -->
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>
							申请布控信息
						</h5>
						<div class="ibox-tools">
							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
							</a>
						</div>
					</div>

						<div class="ibox-content">

							<div class="row">
							
								<div class="col-sm-6">
									<div class="form-group" id="data_2">
										<label class="col-sm-2 control-label">申请布控时间：</label>
										<div class="col-sm-4 input-group date">
                                			<input type="text" class="form-control" name="sqsj" value="${monitor.sqsj}">
                                			<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            			</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">申请人&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<input name="sqr" type="text" maxlength="20"
												class="form-control" value="${monitor.sqr}" required="">
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">联系电话：</label>
										<div class="col-sm-4">
											<input name="lxdh1" type="text" maxlength="18"
												class="form-control" value="${monitor.lxdh1}">
										</div>
									</div>
									
								</div>
								
								<div class="col-sm-6">
									<div class="form-group">
										<label class="col-sm-2 control-label">申请单位&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<input name="sqdw" type="text" maxlength="20"
												class="form-control" value="${monitor.sqdw}" required="">
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">身份证号&nbsp;<i class="fa fa-asterisk" style="color: red; font-size: 10px;"></i>：</label>
										<div class="col-sm-4">
											<input name="bkSfzh" type="text" maxlength="18"
												class="form-control" value="${monitor.bkSfzh}" required="">
										</div>
									</div>
									
								</div>
							
							</div>

						</div>
				</div>
			</div>
			
			
		</div>
		
		<div class="hr-line-dashed"></div>
		<div class="form-group">
			<div class="col-sm-12">
				<button  class="btn btn-primary pull-right m-t-n-xs" type="submit">保存</button>
			</div>
		</div>
		
		</form>
		
	</div>

	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/jquery.min.js?v=2.1.4"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/bootstrap.min.js?v=3.3.5"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/content.min.js?v=1.0.0"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/toastr/toastr.min.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/layer/layer.js"></script>

	<script src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/datapicker/bootstrap-datepicker.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/views/sysdefault/js/uploadPreview.js"></script>

	<script type="text/javascript">
    
    var basePath = '<%=request.getContextPath()%>';
    
    toastr.options = {
    		  "closeButton": true,
    		  "debug": false,
    		  "progressBar": true,
    		  "positionClass": "toast-top-left",
    		  "showDuration": "400",
    		  "hideDuration": "1000",
    		  "timeOut": "3000",
    		  "extendedTimeOut": "1000",
    		  "showEasing": "swing",
    		  "hideEasing": "linear",
    		  "showMethod": "fadeIn",
    		  "hideMethod": "fadeOut"
    		}
    
    $(function(){
    	
    	new uploadPreview({
			UpBtn : "up_img_1",
			DivShow : "imgdiv_1",
			ImgShow : "imgShow_1"
		});
    	
    	//初始化日期控件
    	$("#data_1 .input-group.date").datepicker({
    		startView: 2,
            todayBtn: "linked",
            keyboardNavigation: !1,
            forceParse: !1,
            calendarWeeks: !0,
            autoclose: !0
        });
    	
    	//初始化日期控件
    	$("#data_2 .input-group.date").datepicker({
            todayBtn: "linked",
            keyboardNavigation: !1,
            forceParse: !1,
            calendarWeeks: !0,
            autoclose: !0
        });
    	
    });
    
    //验证并提交表单
    var beforeSub = function(){
    	
    	$.ajax({
			type : "POST",
			url : basePath + "/rlqb/addMonitor.ido",
			data : $("#subForm").serialize(),
			dataType : "json",
			success : function(msg) { 
				if (msg.errCode == '1') {
					location.href="listPersonMonitor.do";
				}else{
					toastr.error(msg.errMsg, "提示");
				}
			},
			error : function(XMLHttpRequest, textStatus, errorThrown) {
				toastr.error("系统出错！", "提示");
			},
			beforeSend : function(XMLHttpRequest){
				layer.load(0, {
					  shade: [0.3,'#ccc'] //0.1透明度的白色背景
					});
			},
			complete : function(XMLHttpRequest, textStatus){
				layer.closeAll();
			}
		});
		
		return false;
    	
    }
    
    //记录点击的图片
    var imgId = "";
	var inputId = "";
    
    //选择图片
    var clickImg = function(mInputId, mImgId, imgageCompress) {
		inputId = mInputId;
    	imgId = mImgId;
    	
    	 layer.open({
			  type: 2,
			  title:"上传图片",
			  fix: false, //不固定
			  maxmin: false,
			  shadeClose: true,
			  shade: 0.3,
			  area: ['600px', '430px'],
			  content: basePath + '/common/selectImage.dop?imageCompress='+imgageCompress
			}); 
	}
    
    //弹出框选择图片回调函数
	var selectCallBack2 = function(data){
		var obj = jQuery.parseJSON(data);
		var imgList = obj.image.split(',');
		if(imgList.length > 0){
			$("#" + inputId).val(imgList[0]);
			$("#" + imgId).attr("src" , imgList[0]);
		}
		layer.closeAll();
	}
    
    //选择项目经理
    var selectPro = function(){
    	layer.open({
			  type: 2,
			  title:"选择项目",
			  fix: false, //不固定
			  maxmin: false,
			  shadeClose: true,
			  shade: 0.3,
			  area: ['1000px', '80%'],
			  content: 'selectPro.do'
		});
    }
    
    //选择项目返回
    var layerCallBack = function(id, name){
    	$("#proId").val(id);
    	$("#proName").val(name);
    	
    	layer.closeAll();
    }
    
    </script>

</body>

</html>